/*
 *  This file is part of the SIRIUS libraries for analyzing MS and MS/MS data
 *
 *  Copyright (C) 2024 Bright Giant GmbH
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along with SIRIUS.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 *  https://openapi-generator.tech
 *  Do not edit the class manually.
 */


package io.sirius.ms.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.sirius.ms.sdk.model.ConfidenceMode;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * User/developer friendly parameter subset for the CSI:FingerID structure db search tool.  Needs results from FingerprintPrediction and Canopus Tool.  Non-Null parameters in this Object well override their equivalent value in the config map.
 */
@JsonPropertyOrder({
  StructureDbSearch.JSON_PROPERTY_ENABLED,
  StructureDbSearch.JSON_PROPERTY_STRUCTURE_SEARCH_D_BS,
  StructureDbSearch.JSON_PROPERTY_TAG_STRUCTURES_WITH_LIPID_CLASS,
  StructureDbSearch.JSON_PROPERTY_EXPANSIVE_SEARCH_CONFIDENCE_MODE
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0")
public class StructureDbSearch {
  public static final String JSON_PROPERTY_ENABLED = "enabled";
  @jakarta.annotation.Nullable
  private Boolean enabled;

  public static final String JSON_PROPERTY_STRUCTURE_SEARCH_D_BS = "structureSearchDBs";
  @jakarta.annotation.Nullable
  private List<String> structureSearchDBs;

  public static final String JSON_PROPERTY_TAG_STRUCTURES_WITH_LIPID_CLASS = "tagStructuresWithLipidClass";
  @jakarta.annotation.Nullable
  private Boolean tagStructuresWithLipidClass;

  public static final String JSON_PROPERTY_EXPANSIVE_SEARCH_CONFIDENCE_MODE = "expansiveSearchConfidenceMode";
  @jakarta.annotation.Nullable
  private ConfidenceMode expansiveSearchConfidenceMode;

  public StructureDbSearch() {
  }

  public StructureDbSearch enabled(@jakarta.annotation.Nullable Boolean enabled) {
    
    this.enabled = enabled;
    return this;
  }

  /**
   * tags whether the tool is enabled
   * @return enabled
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_ENABLED)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean isEnabled() {
    return enabled;
  }


  @JsonProperty(JSON_PROPERTY_ENABLED)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setEnabled(@jakarta.annotation.Nullable Boolean enabled) {
    this.enabled = enabled;
  }

  public StructureDbSearch structureSearchDBs(@jakarta.annotation.Nullable List<String> structureSearchDBs) {
    
    this.structureSearchDBs = structureSearchDBs;
    return this;
  }

  public StructureDbSearch addStructureSearchDBsItem(String structureSearchDBsItem) {
    if (this.structureSearchDBs == null) {
      this.structureSearchDBs = new ArrayList<>();
    }
    this.structureSearchDBs.add(structureSearchDBsItem);
    return this;
  }

  /**
   * Structure databases to search in, If expansive search is enabled this DB selection will be expanded to PubChem  if not high confidence hit was found in the selected databases.  &lt;p&gt;  Defaults to BIO + Custom Databases. Possible values are available to Database API.
   * @return structureSearchDBs
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_STRUCTURE_SEARCH_D_BS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<String> getStructureSearchDBs() {
    return structureSearchDBs;
  }


  @JsonProperty(JSON_PROPERTY_STRUCTURE_SEARCH_D_BS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setStructureSearchDBs(@jakarta.annotation.Nullable List<String> structureSearchDBs) {
    this.structureSearchDBs = structureSearchDBs;
  }

  public StructureDbSearch tagStructuresWithLipidClass(@jakarta.annotation.Nullable Boolean tagStructuresWithLipidClass) {
    
    this.tagStructuresWithLipidClass = tagStructuresWithLipidClass;
    return this;
  }

  /**
   * Candidates matching the lipid class estimated by El Gordo will be tagged.  The lipid class will only be available if El Gordo predicts that the MS/MS is a lipid spectrum.  If this parameter is set to &#39;false&#39; El Gordo will still be executed and e.g. improve the fragmentation  tree, but the matching structure candidates will not be tagged if they match lipid class.
   * @return tagStructuresWithLipidClass
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_TAG_STRUCTURES_WITH_LIPID_CLASS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean isTagStructuresWithLipidClass() {
    return tagStructuresWithLipidClass;
  }


  @JsonProperty(JSON_PROPERTY_TAG_STRUCTURES_WITH_LIPID_CLASS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTagStructuresWithLipidClass(@jakarta.annotation.Nullable Boolean tagStructuresWithLipidClass) {
    this.tagStructuresWithLipidClass = tagStructuresWithLipidClass;
  }

  public StructureDbSearch expansiveSearchConfidenceMode(@jakarta.annotation.Nullable ConfidenceMode expansiveSearchConfidenceMode) {
    
    this.expansiveSearchConfidenceMode = expansiveSearchConfidenceMode;
    return this;
  }

  /**
   * Get expansiveSearchConfidenceMode
   * @return expansiveSearchConfidenceMode
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_EXPANSIVE_SEARCH_CONFIDENCE_MODE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public ConfidenceMode getExpansiveSearchConfidenceMode() {
    return expansiveSearchConfidenceMode;
  }


  @JsonProperty(JSON_PROPERTY_EXPANSIVE_SEARCH_CONFIDENCE_MODE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setExpansiveSearchConfidenceMode(@jakarta.annotation.Nullable ConfidenceMode expansiveSearchConfidenceMode) {
    this.expansiveSearchConfidenceMode = expansiveSearchConfidenceMode;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    StructureDbSearch structureDbSearch = (StructureDbSearch) o;
    return Objects.equals(this.enabled, structureDbSearch.enabled) &&
        Objects.equals(this.structureSearchDBs, structureDbSearch.structureSearchDBs) &&
        Objects.equals(this.tagStructuresWithLipidClass, structureDbSearch.tagStructuresWithLipidClass) &&
        Objects.equals(this.expansiveSearchConfidenceMode, structureDbSearch.expansiveSearchConfidenceMode);
  }

  @Override
  public int hashCode() {
    return Objects.hash(enabled, structureSearchDBs, tagStructuresWithLipidClass, expansiveSearchConfidenceMode);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class StructureDbSearch {\n");
    sb.append("    enabled: ").append(toIndentedString(enabled)).append("\n");
    sb.append("    structureSearchDBs: ").append(toIndentedString(structureSearchDBs)).append("\n");
    sb.append("    tagStructuresWithLipidClass: ").append(toIndentedString(tagStructuresWithLipidClass)).append("\n");
    sb.append("    expansiveSearchConfidenceMode: ").append(toIndentedString(expansiveSearchConfidenceMode)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

